<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>选择器权重</title>
		<!-- 选择器权重越高，选中几率越大 -->
		<style>
			*{  /*权值 0  很容易被覆盖*/
				color: #98dfd9;
				background: #7e8be0;
			}
			div{  /*权值 1*/
				color: #e070e0 !important;
				background: #00ff7f !important;
			}
			.d1{ /*权值 10*/
				color: #ff577e;
				background: #ffe0aa;
			}
			div.d1{ /*选择器权值之和  权值1+10 11*/
				color: #ffff7f;
				background: #ff8a73;
			}
			body div.d1{ /*权值 12*/
				font-size: 20px;
				color: #000000;
				background: #ff0000;
			}
			#d1{ /*权值 100*/
				font-size: 20px;
				color: #aaaaff;
				background: #ff0000;
			}
			div#d1{ /*权值 101*/
				font-size: 20px;
				color: #51ff21;
				background: #ff20bc;
			}
			    div#d1:hover{ /*权值 111 */
				color: #51ff21;
				background: #ff20bc;
			}
		</style>
	</head>
	<body>
		<div class="d1" id="d1" style="color: orange;">Lorem ipsum, dolor sit amet consectetur adipisicing elit. Corrupti aperiam assumenda dolorem distinctio architecto, iusto odio obcaecati aut ipsam sunt laborum, omnis cum hic similique est laboriosam pariatur facilis fugiat.</div>
	</body>
</html>